Skip to content

Run the seed rotation with the endpoints automation app's token - #166

Merged
pgmpablo157321 merged 1 commit into
mainfrom
ci/rotate-seed-sets-app-token
Nov 18, 2026
Merged

pgmpablo157321 merged 1 commit into
mainfrom
ci/rotate-seed-sets-app-token

Conversation

@anandhu-eng

@anandhu-eng anandhu-eng commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

rotate-seed-sets.yml pushed the rotation branch and opened its PR with GITHUB_TOKEN. GitHub starts no workflows for events made with that token. This switches the job to the endpoints automation app, the same app and environment as #162.

Changes

  • Token. The first step mints a token with actions/create-github-app-token v3.3.0, pinned by SHA like the other actions in this file.
    • Secrets: ENDPOINTS_AUTOMATION_BOT_CLIENT_ID and ENDPOINTS_AUTOMATION_APP_PVT_KEY.
    • Scope: this repo only, with contents: write and pull-requests: write.
  • Where the token is used:
    • checkout, so git push uses it;
    • the pending-PR lookup;
    • the overdue nudge comment;
    • gh pr create.
  • Environment. The job runs in AI workflow, which holds the secrets and is limited to main. The weekly schedule always runs from main. A manual run from another branch fails at the environment, which is intended.
  • GITHUB_TOKEN is reduced to permissions: {}.
  • Commit author is now the app's bot account (<app-slug>[bot]), so the commit and the PR have the same author.
    • The CLA allowlist entry bot* is matched as an unanchored regex in mlcommons/cla-bot, so a name containing [bot] passes.
  • PR body drops the "cla-check will not have run" paragraph.

Before merging

  • Confirm the app is installed on endpoints_policies with Contents: write and Pull requests: write. Start the policy syncs when a PR merges #162 only needs Actions on endpoints-automations, so this may be new. If the installation lacks either permission, the mint step fails.

Testing

  • actionlint reports no issues.
  • The job can't be run from this branch, because the environment admits only main.
  • After merge, a manual run on main with dry_run: true checks the parts that need the real app without opening a PR:
    • the environment;
    • token minting with both permissions;
    • the pending-PR lookup.

🤖 Generated with Claude Code

Pushes and PRs made with GITHUB_TOKEN start no workflows, so cla-check never
ran on a rotation PR and had to be fired by hand. The job now mints a token
from the endpoints automation app (secrets in the `AI workflow` environment,
limited to main) and uses it to push, open the PR and comment. GITHUB_TOKEN
gets no permissions. Commits are authored by the app's bot account, and the
PR body no longer carries the manual cla-check note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anandhu-eng
anandhu-eng requested a review from a team November 5, 2026 09:06
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@anandhu-eng
anandhu-eng marked this pull request as draft November 5, 2026 09:09
@anandhu-eng
anandhu-eng requested a balanced review from Copilot November 5, 2026 09:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The app’s required write permissions and main-only AI workflow environment/secrets remain unverified and require live confirmation, including the documented main-branch dry run, beyond code review.

No open issues 🎉

What changed in this PR

Updates seed rotation to use the endpoints automation app’s token so rotation PRs trigger required checks, including cla-check.

Changes:

  • Mints a repository-scoped app token for checkout, PR lookup, comments, and PR creation.
  • Uses the AI workflow environment and removes GITHUB_TOKEN permissions.
  • Attributes commits to the app’s bot account and removes the obsolete CLA-check workaround from the PR body.
File Description
.github/​workflows/​rotate-seed-sets.yml Switches rotation operations and commit attribution to the automation app.

Review effort: Balanced

@anandhu-eng
anandhu-eng marked this pull request as ready for review November 5, 2026 14:28
@pgmpablo157321
pgmpablo157321 merged commit 3517585 into main Nov 18, 2026
4 checks passed

This branch was previously deployed

1 inactive deployment
AI workflow — 045a3aef Deployed Nov 18, 2026 by pgmpablo157321 via dispatch #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants